#ifndef OPENGL_H
#define OPENGL_H

#include "Object.h"
#include <vector>
#include <windows.h>  // sunt mentionate fisiere (biblioteci) care urmeaza sa fie incluse 
#include <gl/freeglut.h> // nu trebuie uitat freeglut.h (sau glut.h sau gl.h & glu.h)

class GLWindow : public Object
{
public:
	GLWindow(integer x, integer y);
	GLWindow();
	var draw();
	var onDraw() { return false; }
	static void OnDraw();
	static GLWindow* This;
	integer w,h;
};

class gl
{
public:
	inline static void LineWidth(double w) { glLineWidth(w); } 
	inline static void BeginLines() { glBegin(GL_LINES); } 
	inline static void Color3(double r, double g, double b) { glColor3d(r,g,b); } 
	inline static void Vertex2(double x, double y) { glVertex2d(x,y); } 
	inline static void Vertex3(double x, double y, double z) { glVertex3d(x,y,z); } 
	inline static void End() { glEnd(); } 
};

#endif